<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_子项目排列方式</title>
    <style>
        .container{
            background-color: #ffd400;
            display: flex;/*弹性布局*/
            /*左对齐*/
            justify-content: flex-start;
            /*右对齐*/
            justify-content: flex-end;
            /*两端对齐*/
            justify-content: space-between;
            /*环绕对齐*/
            justify-content: space-around;
            /*公平对齐*/
            justify-content: space-evenly;
            /*居中对齐*/
            justify-content: center;

            height: 500px;
            /*交叉轴起点对齐*/
            align-items: flex-start;
            /*交叉轴终点对齐*/
            align-items: flex-end;
            /*交叉轴居中对齐*/
            align-items: center;
        }
        .item{
            background-color: red;
            width: 100px;
            height: 100px;
            font-size: 45px;
            border: 3px solid black;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
    <div class="item">5</div>
    <div class="item">6</div>
    <div class="item">7</div>
</div>
</body>
</html>